package com.factory_method;

import com.simple_factory.simplePhoneFactory;

/**
 * 手机店
 */
public class PhoneStore {
    public static void main(String[] args) {
        PhoneFactory factory1 = new SmartFactory();
        Phone phone1 = factory1.createPhoneme();
        phone1.open();
        phone1.call();

        PhoneFactory factory2 = new oldFactory();
        Phone phone2 = factory2.createPhoneme();
        phone2.open();
        phone2.call();

        //也封装一下:使用创建工厂属性+构造方法
    }
}
